<script>
import formMixin from "@/components/formMixin";
export default {
  name: "AegleRadio",
  mixins: [formMixin],
  computed: {
    options() {
      return (this.data && this.data.options) || [];
    },
  },
  render() {
    if (this.schema) {
      const radios = this.options.map((item) => {
        return (
          <el-radio key={item.value} label={item.value}>
            {item.label}
          </el-radio>
        );
      });

      return (
        <el-radio-group
          style={this.style}
          props={{...this.schema.props}}
          v-model={this.model}
        >
          {radios}{" "}
        </el-radio-group>
      );
    }
  },
};
</script>

<style></style>
